{% extends "base.html" %}
{% load static %}

{% block title %}{{ product.name }}{% endblock title %}

{% block breadcrumb %}
  <!-- Start Breadcrumb     ============================================= -->
  <div class="breadcrumb-area min-h-a" style="background-image: url({% static 'assets/img/banner/7.jpg' %}); background-size: 100% 100%; background-position-x: center; background-repeat: no-repeat; min-height: 260px;">
    <div class="container">
      <div class="row banner-padding">
        <div class="col-md-6">
          <img src="{% static 'assets/img/title-c.png' %}" alt="">
        </div>
      </div>
      <div class="row">
        <div class="col-md-6">
        </div>
        <div class="col-md-6 text-right pt-0">
          <ul class="breadcrumb">
            <li><a href="{% url 'user:index' %}"><i class="fa fa-home"></i>首页</a></li>
            <li><a href="{% url 'user:product' %}">服务与产品</a></li>
            <li class="active">{{ product.name }}</li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  <!-- End Breadcrumb -->
{% endblock breadcrumb %}

{% block content %}
  <!-- Start About    ============================================= -->
  <div class="famous-area default-padding top-40" style="background-image: url({% static 'assets/img/bg-2.jpg' %}); background-repeat: no-repeat; background-size: 100%;">
    <div class="container">
      <div class="row">
        <div class="col-md-3">
          <div class="f-item link">
            {% if current_types %}
            <h4>{{ current_types|slice:":2" }}<span>{{ current_types|slice:"2:" }}</span></h4>
            <ul class="sonnav">
                {% for proname in classical_name_list %}
                    <li {% if product.name == proname.name %} class="active" {% endif %}>
                        <a href="{% url 'user:class-product' %}?name={{ proname.name }}&types={{ current_types }}">
                            {{ proname.name }}
                            <i class="fa fa-caret-right"></i>
                        </a>
                    </li>
                {% endfor %}
            </ul>
            {% else %}
            <h4>药品<span>列表</span></h4>
            <ul class="sonnav">
                {% for proname in classical_name_list %}
                    <li {% if product.name == proname.name %} class="active" {% endif %}>
                        <a href="{% url 'user:class-product' %}?name={{ proname.name }}">
                            {{ proname.name }}
                            <i class="fa fa-caret-right"></i>
                        </a>
                    </li>
                {% endfor %}
            </ul>
            {% endif %}
          </div>
        </div>
        <div class="col-md-9">
            <div class="famous-content f-item">
                <h3 class="text-center"><span>{{ product.name }}</span></h3>
                <p class="text-center"><img src="{{ product.img }}" alt=""></p>
                <p class="col-md-offset-2">
                    【药品名称】{{ product.name }}<br>
                    【成　　份】{{ product.composition }}<br>
                    【性　　状】{{ product.properties }}<br>
                    【功能主治】{{ product.main }}<br>
                    【规　　格】{{ product.standard }}<br>
                    【用法用量】{{ product.dosage }}<br>
                    【贮　　藏】{{ product.save_way }}<br>
                    【有效期】  {{ product.time_long }}<br></p>
            </div>
        </div>
      </div>

    </div>
  </div>
  <!-- End About -->

{% endblock content %}
